package com.xxh.securitydemo.controller;

import com.xxh.securitydemo.dto.UmsMenuNode;
import com.xxh.securitydemo.service.MenuService;
import com.xxh.securitydemo.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/menu")
public class UmsMenuController {

    @Autowired
    MenuService menuService;


    @RequestMapping("/treelist")
    public Result listTreeMenu(){
        List<UmsMenuNode> list = menuService.treeList();
        return Result.ok().put("treeList",list);
    }


}
